package com.byedu.domain.course.vo;


import com.byedu.domain.course.LibraryDO;

import java.io.Serializable;
import java.util.List;

public class LibraryVO implements Serializable {

    private static final long serialVersionUID = -2834770389554864551L;

    /*题库编号*/
    private Integer id;
    /*题库名称*/
    private String name;
//    /*题库名称*/
//    private Integer courseId;
    /*试卷拥有的题目数*/
    private int questionNum;

    private int finNum;

    private int libuseNum;

//    public String getLibraryType() {
//        return libraryType;
//    }
//
//    public void setLibraryType(String libraryType) {
//        this.libraryType = libraryType;
//    }
//
//    private String libraryType;


    public LibraryVO() {}

    public LibraryVO(LibraryDO libraryDO, List<QuestionVO> questionVOList) {
        this.id = libraryDO.getId();
//        this.courseId=libraryDO.getCourseId();
        this.name = libraryDO.getName();
//        this.libraryType=libraryDO.getLibraryType();
        this.questionNum = libraryDO.getQuestionNum();
    }

    public LibraryVO(LibraryDO libraryDO) {
        this.id = libraryDO.getId();
        this.name = libraryDO.getName();
//        this.courseId=libraryDO.getCourseId();
//        this.libraryType=libraryDO.getLibraryType();
        this.questionNum = libraryDO.getQuestionNum();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public int getQuestionNum() {
        return questionNum;
    }

    public void setQuestionNum(int questionNum) {
        this.questionNum = questionNum;
    }

    public int getFinNum() {
        return finNum;
    }

    public void setFinNum(int finNum) {
        this.finNum = finNum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        LibraryVO libraryVO = (LibraryVO) o;

        if (id != null ? !id.equals(libraryVO.id) : libraryVO.id != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "LibraryVO{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }

    public int getLibuseNum() {
        return libuseNum;
    }

    public void setLibuseNum(int libuseNum) {
        this.libuseNum = libuseNum;
    }


//    public Integer getCourseId() {
//        return courseId;
//    }
//
//    public void setCourseId(Integer courseId) {
//        this.courseId = courseId;
//    }
}
